package com.entrogy.service.impl;

import com.entrogy.bean.SchoolBuslineDetail;
import com.entrogy.dao.SchoolbuslinedetailMapper;
import com.entrogy.service.SchoolbuslinedetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @Author 许红松
 * @date 2019/4/30 0030 下午 1:53
 * 校车各站点详情service接口实现类
 */
@Service(value="schoolbuslinedetailService")
@Transactional
public class SchoolbuslinedetailServiceImpl implements SchoolbuslinedetailService {

    @Autowired
    private SchoolbuslinedetailMapper schoolbuslinedetailMapper;//校车各站点详情mapper接口
    /**
     *  新增学生乘车站点各信息
     * @param schoolBuslineDetail
     * @return int
     */
    @Override
    public int addSchoolbuslinedetail(SchoolBuslineDetail schoolBuslineDetail) {
        return schoolbuslinedetailMapper.addSchoolbuslinedetail(schoolBuslineDetail);
    }

    /**
     * 查询某班车各站点信息
     * @param map
     * @return List
     */
    @Override
    public List<SchoolBuslineDetail> getList(Map<String, Object> map) {
        return schoolbuslinedetailMapper.getList(map);
    }

    /**
     * 查询某班车各站点信息 总数
     * @param map int
     * @return int
     */
    @Override
    public int getTotal(Map<String, Object> map) {
        return schoolbuslinedetailMapper.getTotal(map);
    }
}
